package cn.chaohi.domain.report;

import java.util.Date;
import cn.chaohi.controller.model.report.ReportStatusReq;
import cn.chaohi.utils.UuidUtil;

public class UpgradeStatusReport {
	
	private String id;

	// 超市ID
	private String marketId;
	// 超市門店ID
	private String marketStoreId;
	// 车号
	private String cartNum;
	// 车子pad wifi的mac地址
	private String wifiMac;
	// 老版本
	private String version;
	//动作名称：1：下载  2：升级  3：降级 
	private String processType;
	//状态数值，0~100 （下载进度或者升级进度）
	private int processValue;
	
	private String errorCode;
	
	private Date createDate;
	
	public UpgradeStatusReport(ReportStatusReq reportStatusReq) {
		this.id = UuidUtil.get32UUID();
		this.marketId = reportStatusReq.getMarketId();
		this.marketStoreId = reportStatusReq.getMarketStoreId();
		this.cartNum = reportStatusReq.getCartNum();
		this.wifiMac = reportStatusReq.getWifiMac();
		this.version = reportStatusReq.getVersion();
		this.processType = reportStatusReq.getProcessType();
		this.processValue = reportStatusReq.getProcessValue();
		this.errorCode = reportStatusReq.getErrorCode();
		this.createDate = new Date();
	}

	public String getMarketId() {
		return marketId;
	}

	public void setMarketId(String marketId) {
		this.marketId = marketId;
	}

	public String getMarketStoreId() {
		return marketStoreId;
	}

	public void setMarketStoreId(String marketStoreId) {
		this.marketStoreId = marketStoreId;
	}

	public String getCartNum() {
		return cartNum;
	}

	public void setCartNum(String cartNum) {
		this.cartNum = cartNum;
	}

	public String getWifiMac() {
		return wifiMac;
	}

	public void setWifiMac(String wifiMac) {
		this.wifiMac = wifiMac;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getProcessType() {
		return processType;
	}

	public void setProcessType(String processType) {
		this.processType = processType;
	}

	public int getProcessValue() {
		return processValue;
	}

	public void setProcessValue(int processValue) {
		this.processValue = processValue;
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public UpgradeStatusReport() {
		super();
	}
}
